<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline">
        <a-row :gutter="24">

          <a-col :md="6" :sm="8">
            <a-form-item label="库名">
              <a-input placeholder="请输入库名" v-model="queryParam.fdSchema"></a-input>
            </a-form-item>
          </a-col>


          <a-col :md="6" :sm="8">
            <a-form-item label="表名称">
              <a-input placeholder="请输入表名称" v-model="queryParam.fdTableName"></a-input>
            </a-form-item>
          </a-col>

      <a-col :md="6" :sm="8">
        <a-form-item label="推送频次">
         <j-dict-select-tag  v-model="queryParam.fdProNum"  placeholder="请选择推送频次" dictCode="autossc_num"/>
         </a-form-item>
      </a-col>
          <a-col :md="6" :sm="8" >
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>

            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('订阅查询')">导出</a-button>
    </div>

    <!-- table区域-begin -->
    <div>

      <a-table
        ref="table"
        size="middle"
        bordered
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">

      </a-table>
    </div>
    <!-- table区域-end -->

    <!-- 表单区域 -->
    <desReportTableModal-modal ref="modalForm" @ok="modalFormOk"></desReportTableModal-modal>
  </a-card>
</template>

<script>
  import DesReportTableModal from './modules/DesReportTableModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import JEllipsis from "@/components/jeecg/JEllipsis";

  export default {
    name: "DesReportTableList",
    mixins:[JeecgListMixin],
    components: {
      JEllipsis,
      DesReportTableModal
    },
    data () {
      return {
        description: '订阅查询管理页面',
        // 表头
        columns: [
          {
            title: '#',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
           },
          {
            title: '库名',
            align: 'center',
            dataIndex: 'fdSchema'
          },
          {
            title: '表名称',
            align: 'center',
            dataIndex: 'fdTableName'
          },

          {
            title: '脱敏目标库',
            align: 'center',
            dataIndex: 'fdSource'
          },
          {
            title: '推送频次',
            align: 'center',
            dataIndex: 'fdProNum_dictText'
          },
          {
            title: '订阅名称',
            align: 'center',
            dataIndex: 'fdSscidName'
          },
          {
            title: '订阅类型',
            align: 'center',
            dataIndex: 'fdType'
          },
        ],
		url: {
          list: "/deal/desReportTable/list",
          exportXlsUrl: "deal/desReportTable/exportXls",
          importExcelUrl: "deal/desReportTable/importExcel",
       },
        loading:false
    }
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
    methods: {

    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>